﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Interop;

namespace ImageAcquisition
{
    /// <summary>
    /// Interaction logic for ToolBarLeft.xaml
    /// </summary>
    public partial class ToolBarLeft : UserControl
    {
        public ToolBarLeft()
        {
            InitializeComponent();
        }

        public Window ParentWindow
        {
            get;
            set;
        }

        private void btnImgAcqu_Click(object sender, RoutedEventArgs e)
        {
            IntPtr handle = new WindowInteropHelper(Application.Current.MainWindow).Handle;
            Point ptLeftTop = (ParentWindow as MainWindow).ImageContainerLeftTop;
            Size imgSize = (ParentWindow as MainWindow).ImageContainerSize;
            CameraControler camera 
                = new CameraControler(handle, (int)ptLeftTop.X, (int)ptLeftTop.Y, (int)imgSize.Width, (int)imgSize.Height);
            camera.Start();
        }

        private void btnVideo_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnPTP_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnSearchAndStat_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnDelImg_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnDiagnoseTemplet_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnSysSetting_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnPrintTemplet_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnWordPrint_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
